namespace EntLibEC.Shopping.Include
{
	using System;
	using System.Data;
	using System.Drawing;
	using System.Web;
    using System.Web.UI;
	using System.Web.UI.WebControls;
	using System.Web.UI.HtmlControls;

	using EntLibEC.Biz.Online;
    using EntLibEC.Info.Basic;
    using EntLibEC.Cmn;

	/// <summary>
	///		Summary description for ProductRemarkTop10Vertical.
	/// </summary>
	public partial class ProductRemarkTop10Vertical : System.Web.UI.UserControl
	{

		protected void Page_Load(object sender, System.EventArgs e)
		{
			// Put user code to initialize the page here
            repProductRemarkTop10.DataSource = ProductRemarkManager.GetInstance().GetRemarkListTop10Ds();
            repProductRemarkTop10.DataBind();
		}

		protected string GetTop10Vertical()
		{
			return ProductRemarkManager.GetInstance().GetRemarkListTop10Vertical();
		}

        protected void repProductRemarkTop10_ItemDataBound(object sender, RepeaterItemEventArgs e)
        {
            if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
            {
                System.Web.UI.WebControls.Image imgProduct = (System.Web.UI.WebControls.Image)e.Item.FindControl("imgProduct");
                imgProduct.ImageUrl = ProductBasicInfo.GetSmallPic(AppConfig.PicturePath, DataBinder.Eval(e.Item.DataItem, "ProductID").ToString());
                imgProduct.ToolTip = Util.RemoveHtmlTag(DataBinder.Eval(e.Item.DataItem, "ProductName").ToString());
            }
        }
	}
}
